import javax.swing.*;
import java.awt.*;
import java.util.*;
class P2 extends JPanel{
	JButton[] btn1 = new JButton[12];
	public P2(){
		this.setLayout(new GridLayout(3,4));
		for(int i=0;i<12;i++){
			//String[] s = {"0","1","2","3","4","5","6","7","8","9","退格","清除"};
			if(i<10) btn1[i] = new JButton(i+"");
			else if(i==10) btn1[i] = new JButton("退格");
			else btn1[i] = new JButton("清除");

			if(i<10) btn1[i].addActionListener(new click(i));
			else if(i==10) btn1[i].addActionListener(new click("退格"));
			else btn1[i].addActionListener(new click("清除"));
			this.add(btn1[i]);
		}

	}
}